<%-- 
    Document   : update_accstore
    Created on : Jun 15, 2012, 11:52:33 AM
    Author     : praneeth
--%>
<%@page import="java.sql.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>update_accstore JSP Page</title>
    </head>
    <body>    <h3> Account has been updated sucessfully ..!</h3>
         
        
        <% 
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            
            String pwd1=request.getParameter("pwd");
            String cpwd1=request.getParameter("cpwd");
            String hq=request.getParameter("HQ");
            String ha=request.getParameter("HA");
            String mb_no=request.getParameter("mbno");
            String e_id=request.getParameter("eid");
            String addr=request.getParameter("add");
            String areaa=request.getParameter("area");
            String pinn=request.getParameter("pin");
            String uid=request.getParameter("uid");
            
             //out.println("USERID:"+uid);
             //out.println("|| acc   updated");
String q1="UPDATE AccCreation SET PASSWORD='"+pwd1+"',CONFIRMPASSWORD='"+cpwd1+"',HINT_Q='"+hq+"',HINT_A='"+ha+"',MOBILENUMBER='"+mb_no+"',EMAIL_ID='"+e_id+"',ADDDRESS='"+addr+"',AREA='"+areaa+"',PIN='"+pinn+"'WHERE USERID='"+uid+"'";
           System.out.println(q1);
             
     String q2="UPDATE Login SET PASSWORD='"+pwd1+"',HINT_Q='"+hq+"',HINT_A='"+ha+"' WHERE USERID='"+uid+"'";
       
      Connection connection=DriverManager.getConnection("jdbc:odbc:egasdsn");
      Statement stmt =connection.createStatement();
        
        int rs=stmt.executeUpdate(q1);
        int rs1=stmt.executeUpdate(q2);    
           
            if((rs==1)&&(rs1==1)){
            
                 out.println("\nThankyou..! ");
                out.println("Account has been updated");
      
                     }
           %>
    </body>
</html>
